package com.neusoft.bootweb.controller;

import com.neusoft.bootweb.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class LoginController {

     @GetMapping("/getmsg.do")
     @ResponseBody
     public String getMsg()
     {
         return "ok1111";
     }

     @RequestMapping("/getok.do")
     public ModelAndView getMsgOK()
     {
          ModelAndView modelAndView = new ModelAndView();
          modelAndView.setViewName("aaa");
          modelAndView.addObject("msg","张飞似的发射点");
          return modelAndView;
     }

     @RequestMapping(value = "/getuser.do",produces = {"application/json;charset=UTF-8"})
     @ResponseBody
     public User getUsers()
     {

          return new User(1,"掌声","湖北武汉");
     }
}
